package netty.io.demo.Buffer;

import java.nio.ByteBuffer;

public class Demo04 {
  public static void main(String[] args) {
    // 这里是 申请 直接内存
    ByteBuffer buffer = ByteBuffer.allocateDirect(1024);
    // 这里申请了 堆内存
    ByteBuffer allocate = ByteBuffer.allocate(1024);
    System.out.println(buffer.isDirect());
    System.out.println(allocate.isDirect());
  }
}
